<template>
  <div class="container">
    <div class="nav">
      <van-nav-bar title="支付方式" @click-left="goBack">
        <template #left>
          <van-icon name="arrow-left" size="1rem" color="black" />
        </template>
      </van-nav-bar>
    </div>
    <div class="content">
      <div class="payDetail">
        <span class="title">支付金额</span>
        <span class="amount">¥50.00</span>
        <div class="desc">向日葵花束生日配送鲜花速递 蓝色梦幻</div>
      </div>
      <div class="payWay">
        <div class="wayTitle">请选择支付方式</div>
        <ul>
          <li>
            <div class="itemLeft">
              <img src="https://img.yzcdn.cn/vant/share-icon-wechat.png" alt />
              <span>微信支付</span>
            </div>
            <van-checkbox v-model="checked" checked-color="#07c160" />
          </li>
        </ul>
      </div>
    </div>

    <div class="footer">
      <button>提交</button>
    </div>
  </div>
</template>

<script>
import { NavBar, Icon, Checkbox } from "vant";
export default {
  components: {
    "van-nav-bar": NavBar,
    "van-icon": Icon,
    "van-checkbox": Checkbox
  },
  data() {
    return {
      checked: true
    };
  },
  methods: {
    goBack() {
      this.$router.push("/activity/sec-kill/checkout");
    }
  }
};
</script>

<style lang="less" scoped>
.container {
  background-color: #f7f7f7;
  height: 100%;
  .nav {
    height: 2.3rem;
  }
  .footer {
    height: 2.8rem;
    text-align: center;
    button {
      background-image: linear-gradient(to right, #ff7c96, #ff365e);
      color: white;
      border: none;
      padding: 0.4rem 0;
      font-size: 0.7rem;
      border-radius: 0.8rem;
      width: 80%;
    }
  }
}
.content {
  height: calc(100% - 5.1rem);
  box-sizing: border-box;
  padding: 0.4rem;
  .payDetail {
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 0.4rem 0;
    .title {
      font-size: 0.7rem;
    }
    .amount {
      padding: 0.4rem 0;
      font-size: 1.2rem;
      font-weight: 700;
    }
    .desc {
      font-size: 0.65rem;
      color: #666;
    }
  }
  .payWay {
    margin-top: 0.4rem;
    background-color: white;
    padding: 0.6rem;
    ul {
      li {
        padding-top: 0.8rem;
        display: flex;
        justify-content: space-between;
        .itemLeft {
          display: flex;
          align-items: center;
          img {
            width: 1.8rem;
            height: 1.8rem;
          }
          span {
            padding-left: 0.6rem;
            font-size: 0.8rem;
          }
        }
      }
    }
    .wayTitle {
      font-size: 0.8rem;
      color: #999;
    }
  }
}
</style>